package com.fangxing.apps.example.mybatis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by fangxing on 17-6-20.
 */
@Controller
public class UserController {
    @Autowired
    UserDao userDao;

    @RequestMapping(value = "/user")
    @ResponseBody
    public String user(){
        UserMyBatisEntity user = userDao.get("fangxing");
        return user.getName();
    }
}
